home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #define MAX_PATCHES 100
-
- #define ON 1
- #define OFF 0
-
- #define NONE -1
-
- /* NUMPOINTS = NUMKNOTS - ORDER
- Everything is Cubic Bezier, so ... */
- #define NUMKNOTS 8 /* number of knots in each dimension of NURBS */
- #define ORDER 4 /* order in each dimension of NURBS */
- #define NUMPOINTS 4
-
- /* user interface tools */
- #define MOVE_TOOL 1
- #define EDIT_TOOL 2
- #define SCALE_TOOL 3
- #define SHARP_ZIP_TOOL 4
- #define SMOOTH_ZIP_TOOL 5
- #define ROUND_ZIP_TOOL 6
- #define UNZIP_TOOL 7
-
- #define SHARP 1
- #define SMOOTH 2
- #define ROUND 3
-
- /* draw polygons to a maximum of this when picking (higher for speed) */
- #define PICKING_TOLERANCE 100.0
-
- /* primitives */
- #define PLANE 1
- #define HEMISPHERE 2
- #define SPHERE 3
- #define CYLINDER 4
- #define CUBE 5
- #define TEAPOT 6 /* yes, this IS a SIGGRAPH demo */
-
- /* node types */
- #define ROOT 1
- #define OBJECT 2
- #define PATCH 3
-
-
- /* Data Structure */
-
- typedef float Mesh[4][4][3];
-
-
- struct zip_struct
- {
- Boolean zipped; /* is this edge zipped ? */
- int zip_type; /* what type - SHARP, SMOOTH, ROUND */
- struct node_struct *patch; /* which patch is it zipped to */
- int edge; /* which edge on the destination patch */
- int s_index;
- int s_step;
- int t_index;
- int t_step;
- int i_s_index;
- int i_s_step;
- int i_t_index;
- int i_t_step;
- };
-
-
- struct patch_struct
- {
- Mesh control;
- Boolean affected[4][4];
- struct zip_struct *zipper[4];
- };
-
-
- struct node_struct
- {
- int node_id; /* only set when writing out file */
- int node_type; /* ROOT, OBJECT or PRIMITIVE */
-
- struct node_struct
- *parent,
- *child,
- *sibling,
- *prev_sibling;
-
- struct patch_struct *patch; /* only used if node_type == PATCH */
-
- Boolean selected; /* is this node selected */
- };
-
-
-
-
-